<template>
<div>
        <p style="font-weight: bold" class="interfaceHead"><i class="el-icon-s-promotion"></i>行政许可证件</p>
        <el-divider></el-divider>
    <div>
    <img  :src="this.$store.state.baseApi+card.data" alt="">
    </div>
    <el-button type="primary" @click="download">下载</el-button>

</div>
</template>

<script>
    export default {
        name: "UserPaper",
        data(){
            return{
                card:'',
            }
        },
        mounted() {
            this.initAdmin();

        },
        computed: {
            headers: function () {
                return {
                    "Authorization": `${localStorage.getItem('token')}`
                }
            }
        },
        methods:{
            initAdmin(){
                // 接口地址
                this.getRequest('/company/cert').then(resp=>{
                    if(resp){
                        console.log(resp)
                        this.card= resp.data;
                    }
                })
            },
            download(){
                this.getRequest('/company/cert/download').then(resp=>{
                    if(resp){
                        this.getRequest(resp.data.data)
                    }
                })
            }
        }

    }
</script>

<style scoped>

</style>